<div class="span3">
    <div id="vtns_right_hook">
    	<?
		foreach ($rightBlocks as $key=>$rightBlock)
		{
			if ($rightBlock['cms_type'] == 2 && $rightBlock['template'] == 0)
			{
			?>
			<div class="box vtns-box-blue">
				<div class="title">
					<h4><?php echo $rightBlock['name'] ?></h4>
				</div>
				<div class="content">
					<?php 
						if ($rightBlock['cms_array']) {
							if (sizeof($rightBlock['cms_array']) == 1) {
								echo htmlspecialchars_decode($rightBlock['cms_array'][0]['content']);
							} else {
								foreach ($rightBlock['cms_array'] as $cms_partial) {
								?>
									<ul class="arrow arrow-blue">
										<li><a href="<?php echo url_for('cms/permalink?cms_category_id='.$rightBlock['cms_category_id'].'&cms_id='.$cms_partial['cms_id'].'-'.vtnsSEO::getPermalink($cms_partial['name']))?>"><?php echo $cms_partial['name'] ?></a></li>
									</ul>
								<?php
								}
							}
						}
					?>
				</div>
			</div>
			<?
			}
		}
		?>
        <div class="box vtns-box-blue">
            <div class="title">
                <h4>Visa Requirements</h4>
            </div>
            <div class="content">
            	<center>
                    <div class="row-fluid">
                        Do you need vietnam visa ? 
                    </div>
                </center>
                <?php 
					$visa_requirements = $rightBlocks['visa_requirement']['cms_array'];
				?>
                <div class="row-fluid marginT10 marginB10" style="margin-left:30px;">
                	<select id="sbo_visa_requirements" rel="<?php echo $rightBlocks['visa_requirement']['cms_category_id']?>">
                    	<option value="0">Select Nationality</option>
                        <?php foreach ($visa_requirements as $visa_requirement) : ?>
                        <option value="<?php echo $visa_requirement['cms_id']?>"><?php echo $visa_requirement['name']?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
                <center>
                    <div class="row-fluid">
                        <button id="btn_visa_requirements" class="btn">Check Now</button>
                    </div>
                </center>
            </div>
        </div>
    </div>
</div>
<script>
$(document).ready(function()
{
	$("#btn_visa_requirements").live('click', function() {
		cat = $("#sbo_visa_requirements").attr("rel");
		val = $("#sbo_visa_requirements").val();
		if (val != 0)
		{
			window.location = "/cms/"+cat+"/"+val+"-visa-requirements.html";
		} else {
			window.location = "/cms/"+cat+"-visa-requirements.html";
		}
	});
});
</script>